<?php
	include_once("arc/ARC2.php");
	include_once('config.php');
	
	$store = ARC2::getStore($arc_config);
	
	if (!$store->isSetUp()) {
		$store->setUp(); //create MySQL tables
	}
	
	$q = 'PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
			PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
			PREFIX kb: <http://protege.stanford.edu/kb#>
			SELECT ?label ?comment
			WHERE { ?clase rdfs:label ?label .
				?clase rdfs:comment ?comment;
				rdf:type "http://www.w3.org/2000/01/rdf-schema#Class" .
			}';
	
	$rows = $store->query($q, 'rows');
	$r = '';
	$i = 1;

	if ($rows = $store->query($q, 'rows')) {
		$r = '<table border=1><th>Número</th><th>Concepto</th><th>Descripción</th>'."\n";
	}
?>